package com.qidianit.mes.pro.mapper;

import com.qidianit.mes.pojo.Workstation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.sql.Wrapper;
import java.util.List;

/**
 * @Author: YKYB
 * @Date: 2025/10/1 13:54
 * @Description:
 */
@Mapper
public interface WorkstationMapper {
    /**
     * 多条件查询工作站
     *
     * @param workstation
     * @return
     */
    List<Workstation> selectList(Workstation workstation);

    /**
     * 根据编码查询工作站
     *
     * @param code
     * @return
     */
    Workstation selectByCode(String code);

    /* 新增工作站 */
    int insertWorkstation(Workstation workstation);

    /*更新工作站*/
    int updateById(Workstation workstation);

    Workstation selectById(Long id);

    int updateDeleteFlagById(Long id, int i);

    /*批量删除*/
    int batchDelete(@Param("ids") List<Long> ids, @Param("deleteFlag") int deleteFlag);

    /*修改工作状态*/
    int updateStatusById(@Param("id") Long id, @Param("status") Integer status);

    /*根据车间ID查询工作站列表 */
    List<Workstation> selectByWorkshopId(@Param("workshopId") Long workshopId);
}
